PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


GetThemeScrollBarTrackRect

Obtains the area containing the track portion of a scroll bar.

pascal OSStatus GetThemeScrollBarTrackRect (
                     const Rect *bounds,
                     ThemeTrackEnableState enableState,
                     ThemeTrackPressState pressState,
                     Boolean isHoriz,
                     Rect *trackBounds);
bounds
A pointer to a structure of type Rect . Before calling GetThemeScrollBarTrackRect , set the rectangle to the boundary of the scroll bar, in local coordinates. Typically, the rectangle you specify is the entire base control rectangle--that is, the value contained in the contrlRect field of the track's ControlRecord structure.
enableState
A value of type ThemeTrackEnableState . Pass a constant specifying the current state of the scroll bar; see Theme Track Enable State Constants for descriptions of possible values.
pressState
A value of type ThemeTrackPressState . Pass a constant specifying what is pressed in an active scroll bar or 0 if nothing is pressed; the press state is ignored if the scroll bar is not active. See Theme Track Press State Constants for descriptions of possible values.
isHoriz
A value of type Boolean . Pass true if the scroll bar is horizontal; pass false if it is vertical.
trackBounds
A pointer to a structure of type Rect . On return, the structure contains the rectangle that bounds the track portion of the scroll bar. Note that the rectangle produced does not include in its bounds any tick marks that a track (such as a slider) might have; tick marks are drawn outside the track rectangle. Similarly, for a scroll bar, the rectangle produced does not contain the scroll bar arrows, just the track itself.
function result
A result code; see Result Codes .
DISCUSSION

Your application may call the GetThemeScrollBarTrackRect function to obtain the actual rectangle containing the track portion of a scroll bar under the current theme.

VERSION NOTES

Available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)